<?php

namespace frontend\modules\resource\logic;


use frontend\modules\resource\models\BranchSearch;


/**
 * BranchSearch represents the model behind the search form of `common\models\Branch`.
 */
class BannerLogic
{

    /**
     * @param $id
     * @return array
     */
    public function getBannerBranchTitle($id)
    {
        $model = BranchSearch::find()->select('title')->where(['id' => $id])->asArray()->one();
        if(empty($model))
            return [];
        return [$id => $model['title']];
    }

}
